package cn.tedu.medicalpath.role.controller;

import cn.tedu.medicalpath.base.response.JsonResult;
import cn.tedu.medicalpath.role.mapper.ModuleInfoMapper;
import cn.tedu.medicalpath.role.pojo.vo.ModuleInfoVO;
import cn.tedu.medicalpath.role.service.ModuleInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/v1/module")
@Slf4j
public class ModuleInfoController {

    @Autowired
    private ModuleInfoService moduleInfoService;

    @GetMapping("select")
    public JsonResult select() {
        log.debug("开始处理【查询模块列表】的请求");
        String[] moduleTitleArr = moduleInfoService.select();
        log.debug("查询模块列表的结果：{}", moduleTitleArr);
        return JsonResult.success(moduleTitleArr);
    }
}
